<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

<body>

<h1>测试ajax</h1>

<button>发送ajax</button>

</body>
</html>
<script src="js/jquery-3.1.0.min.js"></script>
<script>

    $(()=>{
        $("button").click(()=>{
            $.ajax({
                url:"ajax/getEmpInfoById",
                data:{
                    "eid":20
                },
                type:"post",
                dataType:"json",
                success:(datas)=>{
                    console.log(datas);
                }
            });
        });
    });


</script>